package com.woniuxy.reader.controller;


import com.woniuxy.reader.entity.Chapter;
import com.woniuxy.reader.service.BookDataService;
import com.woniuxy.result.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zh_o
 * @since 2020-10-12
 */
@RestController
@RequestMapping("/bookData")
public class BookDataController {
    @Resource
    private BookDataService bookDataService;
    @GetMapping("{bookId}")
    public ResponseResult getByBookId(@PathVariable("bookId") Integer bookId){
        return ResponseResult.success(bookDataService.getByBookId(bookId));
    }
}

